//
//  UCSCloudDownloadTool.swift
//  LunalerApp
//
//  Created by 露乐ios on 2018/2/8.
//  Copyright © 2018年 露乐ios. All rights reserved.
//

import UIKit

class UCSCloudDownloadTool: NSObject {
    
    class func launchImageName() -> AnyObject {
        let screenSize = UIScreen.main.bounds.size as CGSize
        let viewOrientation = "Portrait" // 默认竖屏
        let imageDict = Bundle.main.infoDictionary! as NSDictionary
        let imageDictArr = imageDict.value(forKey: "UILaunchImages") as! NSArray
        for dict in imageDictArr
        {
            let itemDict = dict as! NSDictionary
            let imageSize = CGSizeFromString(itemDict.value(forKey: "UILaunchImageSize") as! String)
            if (__CGSizeEqualToSize(imageSize, screenSize) && viewOrientation == (itemDict.value(forKey: "UILaunchImageOrientation") as! NSString) as String){
                return itemDict.value(forKey: "UILaunchImageName") as! NSString
            }
        }
        return NSNull()
        
    }
}
